package partes_GUI.ExpLvl_GUI;

import partes_GUI.PanelGeneral;


public class ExpLvlPanel extends PanelGeneral {
	
	private static final long serialVersionUID = 5037595657102511372L;
	
	private ExpLvlTF[] TFs;
	
	public ExpLvlPanel(ExpLvlComponentFactory f) {
		super();
		TFs = f.crearCampos();
		this.add(TFs[0]);
		TFs[0].setBounds(marco, marco, 45, 21);
		this.add(TFs[1]);
		TFs[1].setBounds(marco, marco+sep+21, 90, 21);
	}
	
	
	public int getLvl(){
		if (TFs[0].getText().equals(""))
			return 0;
		else
			return Integer.parseInt(TFs[0].getText());
	}

	public int getExp(){
		if (TFs[1].getText().equals(""))
			return 0;
		else
			return Integer.parseInt(TFs[1].getText());
	}

	public void Ubicar(int X, int Y) {
		this.setBounds(X, Y, marco*2+90, marco*2+sep+42);
		
	}
	
}
